LOAD DATA 
TRUNCATE  
INTO TABLE cafou_mur_sec_tb
WHEN VAR_77 = 'Basket'
FIELDS TERMINATED BY ';' 
TRAILING NULLCOLS 
(
 SEC_01       "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :SEC_01),1,10))"         --id_carrefour
,ISU_16       "SUBSTR(TRIM(BOTH FROM :ISU_16),1,20)"                    --se_iss
,ISU_55A      "SUBSTR(TRIM(BOTH FROM :ISU_55A),1,20)"                   --se_clas0
,SEC_06       "SUBSTR(TRIM(BOTH FROM :SEC_06),1,15)"                    --se_i_code
,SEC_11       "SUBSTR(TRIM(BOTH FROM :SEC_11),1,3)"                     --actif
,SEC_16A      "SUBSTR(TRIM(BOTH FROM :SEC_16A),1,15)"                   --eq_veri_in
,SEC_19       "SUBSTR(TRIM(BOTH FROM :SEC_19),1,15)"                    --eq_cote
,SEC_21       "SUBSTR(TRIM(BOTH FROM :SEC_21),1,35)"                    --se_f_name
,SEC_22       "SUBSTR(TRIM(BOTH FROM :SEC_22),1,50)"                    --se_com0
,SEC_24       "SUBSTR(TRIM(BOTH FROM :SEC_24),1,21)"                    --se_rtf0
,SEC_31       "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :SEC_31),1,5),'999D99')" --pct_omis
,VAR_91       "SUBSTR(TRIM(BOTH FROM :VAR_91),1,30)"                    --des_franc
,VAR_92       "SUBSTR(TRIM(BOTH FROM :VAR_92),1,30)"                    --des_angl
,SEC_46       "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :SEC_46),1,14))"         --se_nout
,SEC_48       "DECODE( SUBSTR(:SEC_48,LENGTH(TO_CHAR(:SEC_48)),1) , 'K' , TO_NUMBER(TO_NUMBER(SUBSTR(:SEC_48,1,LENGTH(TO_CHAR(:SEC_48))-1))*1000,'999D99') , TO_NUMBER(SUBSTR(:SEC_48,1,LENGTH(TO_CHAR(:SEC_48))),'999D99') )" --vote
,SEC_51A      "SUBSTR(TRIM(BOTH FROM :SEC_51A),1,3)"                    --se_cur
,SEC_M2A      "SUBSTR(TRIM(BOTH FROM :SEC_M2A),1,71)"                   --se_com2
,SEC_M4A      "SUBSTR(TRIM(BOTH FROM :SEC_M4A),1,10)"                   --se_market
,SEC_M5A      "SUBSTR(TRIM(BOTH FROM :SEC_M5A),1,10)"                   --trd_clause
,SEC_M6       "SUBSTR(TRIM(BOTH FROM :SEC_M6),1,17)"                    --se_label
,VAR_20       "SUBSTR(TRIM(BOTH FROM :VAR_20),1,71)"                    --se_com1
,VAR_21       "SUBSTR(TRIM(BOTH FROM :VAR_21),1,26)"                    --eq_sym_blp
,SEC_72A      "SUBSTR(TRIM(BOTH FROM :SEC_72A),1,15)"                   --link_instr
,SEC_51D      "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :SEC_51D),1,10))"        --divisor
,SEC_52A      "SUBSTR(TRIM(BOTH FROM :SEC_52A),1,40)"                   --art_loi
,SEC_M8A      "SUBSTR(TRIM(BOTH FROM :SEC_M8A),1,20)"                   --se_rtf3
,VAR_23       "SUBSTR(TRIM(BOTH FROM :VAR_23),1,15)"                    --se_code
,SEC_17B      "SUBSTR(TRIM(BOTH FROM :SEC_17B),1,50)"                   --eq_votant
,VAR_77       "SUBSTR(TRIM(BOTH FROM :VAR_77),1,6)"                     --se_group
,VAR_78       "SUBSTR(TRIM(BOTH FROM :VAR_78),1,10)"                    --se_type
,VAR_89       "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :VAR_89),1,1))"          --eq_lz
,SE_ISS	      FILLER
,SEC_27       "SUBSTR(TRIM(BOTH FROM :SEC_27),1,50)"                    --Bloomberg security type1
,SEC_28       "SUBSTR(TRIM(BOTH FROM :SEC_28),1,50)"                    --Bloomberg security type2
,SEC_79       "SUBSTR(TRIM(BOTH FROM :SEC_79),1,8)"                     --ipo indicator
,VAR_93       "SUBSTR(TRIM(BOTH FROM :VAR_93),1,6)"			--SE_CATEGORY
,VAR_95       "SUBSTR(TRIM(BOTH FROM :VAR_95),1,17)"			--ADR_LABEL
,VAR_96       "SUBSTR(TRIM(BOTH FROM :VAR_96),1,10)"			--ADR_MARKET
,SEC_66       "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :SEC_66),1,10))"		--Conversion ratio
,VAR_97       "SUBSTR(TRIM(BOTH FROM :VAR_97),1,1)"			--ADR_REPAID_DIVIDEND_PROP
,VAR_98       "SUBSTR(TRIM(BOTH FROM :VAR_98),1,15)"			--ADR_PUB_STYLE
,SEC_64       "SUBSTR(TRIM(BOTH FROM :SEC_64),1,60)"                    --eq_sec_type
,SEC_49       "TO_NUMBER(REPLACE(SUBSTR(TRIM(BOTH FROM :SEC_49),1,10),CHR(13),''))"         --lotmin           
)
INTO TABLE cafou_mur_sec_tb
WHEN VAR_77 = 'Equity'
FIELDS TERMINATED BY ';' 
TRAILING NULLCOLS 
(
 SEC_01       POSITION(1) "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :SEC_01),1,10))"         --id_carrefour
,ISU_16       "SUBSTR(TRIM(BOTH FROM :ISU_16),1,20)"                    --se_iss
,ISU_55A      "SUBSTR(TRIM(BOTH FROM :ISU_55A),1,20)"                   --se_clas0
,SEC_06       "SUBSTR(TRIM(BOTH FROM :SEC_06),1,15)"                    --se_i_code
,SEC_11       "SUBSTR(TRIM(BOTH FROM :SEC_11),1,3)"                     --actif
,SEC_16A      "SUBSTR(TRIM(BOTH FROM :SEC_16A),1,15)"                   --eq_veri_in
,SEC_19       "SUBSTR(TRIM(BOTH FROM :SEC_19),1,15)"                    --eq_cote
,SEC_21       "SUBSTR(TRIM(BOTH FROM :SEC_21),1,35)"                    --se_f_name
,SEC_22       "SUBSTR(TRIM(BOTH FROM :SEC_22),1,50)"                    --se_com0
,SEC_24       "SUBSTR(TRIM(BOTH FROM :SEC_24),1,21)"                    --se_rtf0
,SEC_31       "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :SEC_31),1,5),'999D99')" --pct_omis
,VAR_91       "SUBSTR(TRIM(BOTH FROM :VAR_91),1,30)"                    --des_franc
,VAR_92       "SUBSTR(TRIM(BOTH FROM :VAR_92),1,30)"                    --des_angl
,SEC_46       "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :SEC_46),1,14))"         --se_nout
,SEC_48       "DECODE( SUBSTR(:SEC_48,LENGTH(TO_CHAR(:SEC_48)),1) , 'K' , TO_NUMBER(TO_NUMBER(SUBSTR(:SEC_48,1,LENGTH(TO_CHAR(:SEC_48))-1))*1000,'999D99') , TO_NUMBER(SUBSTR(:SEC_48,1,LENGTH(TO_CHAR(:SEC_48))),'999D99') )" --vote
,SEC_51A      "SUBSTR(TRIM(BOTH FROM :SEC_51A),1,3)"                    --se_cur
,SEC_M2A      "SUBSTR(TRIM(BOTH FROM :SEC_M2A),1,71)"                   --se_com2
,SEC_M4A      "SUBSTR(TRIM(BOTH FROM :SEC_M4A),1,10)"                   --se_market
,SEC_M5A      "SUBSTR(TRIM(BOTH FROM :SEC_M5A),1,10)"                   --trd_clause
,SEC_M6       "SUBSTR(TRIM(BOTH FROM :SEC_M6),1,17)"                    --se_label
,VAR_20       "SUBSTR(TRIM(BOTH FROM :VAR_20),1,71)"                    --se_com1
,VAR_21       "SUBSTR(TRIM(BOTH FROM :VAR_21),1,26)"                    --eq_sym_blp
,SEC_72A      "SUBSTR(TRIM(BOTH FROM :SEC_72A),1,15)"                   --link_instr
,SEC_51D      "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :SEC_51D),1,10))"        --divisor
,SEC_52A      "SUBSTR(TRIM(BOTH FROM :SEC_52A),1,40)"                   --art_loi
,SEC_M8A      "SUBSTR(TRIM(BOTH FROM :SEC_M8A),1,20)"                   --se_rtf3
,VAR_23       "SUBSTR(TRIM(BOTH FROM :VAR_23),1,15)"                    --se_code
,SEC_17B      "SUBSTR(TRIM(BOTH FROM :SEC_17B),1,50)"                   --eq_votant
,VAR_77       "SUBSTR(TRIM(BOTH FROM :VAR_77),1,6)"                     --se_group
,VAR_78       "SUBSTR(TRIM(BOTH FROM :VAR_78),1,10)"                    --se_type
,VAR_89       "TO_NUMBER(SUBSTR(TRIM(BOTH FROM :VAR_89),1,1))"          --eq_lz
,SE_ISS	      FILLER
,SEC_27       "SUBSTR(TRIM(BOTH FROM :SEC_27),1,50)"                    --Bloomberg security type1
,SEC_28       "SUBSTR(TRIM(BOTH FROM :SEC_28),1,50)"                    --Bloomberg security type2
,SEC_79       "SUBSTR(TRIM(BOTH FROM :SEC_79),1,8)"                     --ipo indicator
,VAR_93       FILLER
,VAR_95       FILLER
,VAR_96       FILLER
,SEC_66       FILLER
,VAR_97       FILLER
,VAR_98       FILLER
,SEC_64       "SUBSTR(TRIM(BOTH FROM :SEC_64),1,60)"                    --eq_sec_type
,SEC_49       "TO_NUMBER(REPLACE(SUBSTR(TRIM(BOTH FROM :SEC_49),1,10),CHR(13),''))"         --lotmin           
)
